;Assembler header file for Scrollbar
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:07:20 2005
;Tom Hughes, tom@compton.nu, 14 Mar 1999

        [       :LNOT: :DEF: Scrollbar_Hdr
        GBLS    Scrollbar_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Gadget
        GBLS    Get_Gadget
        ]
        [       :LNOT: :DEF: Gadget_Hdr
Get_Gadget                      SETS    "GET oslib/Gadget.Hdr"
        |
Get_Gadget                      SETS    ""
        ]
        $Get_Gadget

;Symbols for constants
Class_Scrollbar                 *       &401B
Action_ScrollbarPositionChanged *       &140183
Scrollbar_HasVerticalScrollbar  *       &1
Scrollbar_HasHorizontalScrollbar *       &2
Scrollbar_BoundsLower           *       &1
Scrollbar_BoundsUpper           *       &2
Scrollbar_BoundsVisibleLength   *       &4
Scrollbar_IncrementsLine        *       &1
Scrollbar_IncrementsPage        *       &2

;Symbols for structure offsets and sizes
                                ^       0
Scrollbar_Gadget_type           #       Int
Scrollbar_Gadget_event          #       Int
Scrollbar_Gadget_lower_bound    #       Int
Scrollbar_Gadget_upper_bound    #       Int
Scrollbar_Gadget_value          #       Int
Scrollbar_Gadget_visible_length #       Int
Scrollbar_Gadget_line_increment #       Int
Scrollbar_Gadget_page_increment #       Int
Scrollbar_Gadget                *       @

                                ^       0
Scrollbar_Object                Gadget_Object_MEMBERS
Scrollbar_Object_type           #       Int
Scrollbar_Object_event          #       Int
Scrollbar_Object_lower_bound    #       Int
Scrollbar_Object_upper_bound    #       Int
Scrollbar_Object_value          #       Int
Scrollbar_Object_visible_length #       Int
Scrollbar_Object_line_increment #       Int
Scrollbar_Object_page_increment #       Int
Scrollbar_Object                *       @

                                ^       0
Scrollbar_PositionChanged_new_position #       Bits
Scrollbar_PositionChanged_direction #       Int
Scrollbar_PositionChanged       *       @

                                ^       0
Scrollbar_ActionPositionChanged_new_position #       Bits
Scrollbar_ActionPositionChanged_direction #       Int
Scrollbar_ActionPositionChanged *       @

                                ^       0
Scrollbar_ActionPositionChangedBlock Toolbox_ActionHeader_MEMBERS
Scrollbar_ActionPositionChangedBlock_new_position #       Bits
Scrollbar_ActionPositionChangedBlock_direction #       Int
Scrollbar_ActionPositionChangedBlock *       @

                                ^       0
                                #       Bits
Scrollbar_State                 *       @

                                ^       0
                                #       Bits
Scrollbar_BoundsFlags           *       @

                                ^       0
                                #       Bits
Scrollbar_IncrementsFlags       *       @


;Symbols for SWI's and SWI reason codes
Scrollbar_GetState              *       &401B
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401B
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 = state (Scrollbar_State)

Scrollbar_SetState              *       &401C
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401C
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R4 = state (Scrollbar_State)

Scrollbar_SetBounds             *       &401D
   ;Entry
   ;  R0 = flags (Scrollbar_BoundsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401D
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R4 = lower_bound (Int)
   ;  R5 = upper_bound (Int)
   ;  R6 = visible_length (Int)

Scrollbar_SetLowerBound         *       &1
   ;Entry
   ;  R0 = &1 :OR: flags (Scrollbar_BoundsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401D
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R4 = lower_bound (Int)

Scrollbar_SetUpperBound         *       &2
   ;Entry
   ;  R0 = &2 :OR: flags (Scrollbar_BoundsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401D
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R5 = upper_bound (Int)

Scrollbar_SetVisibleLength      *       &4
   ;Entry
   ;  R0 = &4 :OR: flags (Scrollbar_BoundsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401D
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R6 = visible_length (Int)

Scrollbar_GetBounds             *       &401E
   ;Entry
   ;  R0 = flags (Scrollbar_BoundsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 = lower_bound (Int)
   ;  R1 = upper_bound (Int)
   ;  R2 = visible_length (Int)

Scrollbar_GetLowerBound         *       &1
   ;Entry
   ;  R0 = &1 :OR: flags (Scrollbar_BoundsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 = lower_bound (Int)
   ;  R1 corrupted
   ;  R2 corrupted

Scrollbar_GetUpperBound         *       &2
   ;Entry
   ;  R0 = &2 :OR: flags (Scrollbar_BoundsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 corrupted
   ;  R1 = upper_bound (Int)
   ;  R2 corrupted

Scrollbar_GetVisibleLength      *       &4
   ;Entry
   ;  R0 = &4 :OR: flags (Scrollbar_BoundsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 corrupted
   ;  R1 corrupted
   ;  R2 = visible_length (Int)

Scrollbar_SetValue              *       &401F
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401F
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R4 = value (Int)

Scrollbar_GetValue              *       &4020
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4020
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 = value (Int)

Scrollbar_SetIncrements         *       &4021
   ;Entry
   ;  R0 = flags (Scrollbar_IncrementsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4021
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R4 = line_increment (Int)
   ;  R5 = page_increment (Int)

Scrollbar_SetLineIncrement      *       &1
   ;Entry
   ;  R0 = &1 :OR: flags (Scrollbar_IncrementsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4021
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R4 = line_increment (Int)

Scrollbar_SetPageIncrement      *       &2
   ;Entry
   ;  R0 = &2 :OR: flags (Scrollbar_IncrementsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4021
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R5 = page_increment (Int)

Scrollbar_GetIncrements         *       &4022
   ;Entry
   ;  R0 = flags (Scrollbar_IncrementsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4022
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 = line_increment (Int)
   ;  R1 = page_increment (Int)

Scrollbar_GetLineIncrement      *       &1
   ;Entry
   ;  R0 = &1 :OR: flags (Scrollbar_IncrementsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4022
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 = line_increment (Int)
   ;  R1 corrupted

Scrollbar_GetPageIncrement      *       &2
   ;Entry
   ;  R0 = &2 :OR: flags (Scrollbar_IncrementsFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4022
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 corrupted
   ;  R1 = page_increment (Int)

Scrollbar_SetEvent              *       &4023
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4023
   ;  R3 = scroll_bar (Toolbox_C)
   ;  R4 = event_code (Bits)

Scrollbar_GetEvent              *       &4024
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4024
   ;  R3 = scroll_bar (Toolbox_C)
   ;Exit
   ;  R0 = event_code (Bits)

        ]
        END
